package com.sumainfor.wx.tenant.controller.gmio;

import com.sumainfor.wx.tenant.service.impl.FwmsSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 工作台搜索
 * <p>
 *
 * @author: zc
 * @create: 2019-09-20 10:18
 **/
@Controller
@RequestMapping("/provider/key/tenant/FwmsSearch")
public class FwmsSearchController {

    @Autowired
    FwmsSearchService fwmsSearchService;

    /**
     * 根据租客姓名或者手机号查询租客详情
     * @author zhoucong
     * @data 2019/9/20
     * @Param
     * @return
     */
    @ResponseBody
    @PostMapping("/getNameOrPhoneList")
    public List<Map<String,Object>> getNameOrPhoneList(@RequestParam String search){
        return fwmsSearchService.getNameOrPhoneList(search);
    }

    /**
     * 获取租客信息
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/getTenantXinxi")
    public Map<String,Object> getTenantXinxi(@RequestBody Map<String,Object> params){
        return fwmsSearchService.getTenantXinxi(params);
    }


}
